home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
calctime.zip
/
CALCTIME.DOC
< prev
Wrap
Text File
|
1990-09-16
|
24KB
|
727 lines
┌───────────────────────────────────────────────────┐
│ CALCTIME version 1.2 │
│ │
│ DOS Command Utility Involving Time. │
│ │
│ Reference Manual │
└───────────────────────────────────────────────────┘
Steve Williams
4380 US 29
Tucker, Ga 30084
Copyright 1990. All rights reserved.
This version of Calctime is available as "shareware". Non-registered
users are granted a limited licence to make an evaluation copy for
trail use on a private, non-commercial basis. After evaluating this
software, you should either register your copy or discontinue it's
use. Registration entitles you to private use the software.
Disclaimer
Use of this program acknowledges this disclaimer: "This program is
supplied as is. The author disclaims all warranties, expressed or
implied, including, without limitation, the warranties of
merchantability and of fitness of this program for any purpose. The
author assumes no liability for damages direct, indirect, or
consequential, which may result from the use or misuse of this
program."
Use this program at your own risk.
- 1 -
┌───────────────────┐
│ Table of Contents │
└───────────────────┘
Title page and Disclaimer
Distribution Contents
Introduction
Usage
Errors
Software Information
Registration Form
Distribution Contents
The following files are included in the CALCTIME Package.
CALCTIME.COM
CALCTIME.DOC
Introduction
This utility is similar to David Cusimano's program USETIME.EXE.
Mr. Cusimano did an excellent job on USETIME, but the program does not
perform the work that I required of it. So, I worked up CALCTIME to
replace and remove the limitations of USETIME.
Calctime is capable of not only substituting time parameters in
DOS commands, but of manipulating the time and date as well; there are
also more substitutions available to the user. This utility runs in a
smaller environment, and conserves memory much better than previous
versions.
This program is flexible and is aware of it's true name, if you
rename it, it will inform you of such on the help screen. This is not
a protection scheme, but something I've been playing around with and
working on. Calctime's awareness also has a direct effect on it's use
in conjunction with the environment list.
Read this documentation and try out the program. If you find it to
be useful, please register it for $10(US). By supporting shareware,
you make it possible for shareware products to be produced.
This program should be error free. If you encounter an error, I
will be more than willing to correct the error as soon as possible.
Thank You for your support.
- 2 -
Usage
CalcTime has the following format:
CALCTIME [/switches] (command) [arguments and keys] <cr>
SWITCHES: a few rules to live by... but, switches are optional.
- All switches must appear before the substituting command line.
- All switches are denoted by a slash ("/") in front of each switch.
- Each switch must be separated by at least one space.
- And, switches may not contain any spaces in them.
The following switches directly effect the time and date substitution
keys. All these switches are cumulative in nature.
Y±Σ : adds or subtracts years from the current value.
M±Σ : adds or subtracts months from the current value.
D±Σ : adds or subtracts days from the current value.
H±Σ : adds or subtracts hours from the current value.
I±Σ : adds or subtracts minutes from the current value.
S±Σ : adds or subtracts seconds from the current value.
- "±" denotes a plus(+) or minus(-), for addition and subtraction.
- "Σ" denotes an integer or another substitution key.
An integer I can see, but another substitution key? Here's an
example, what if you are using the current day + the current month for
a dynamic password scheme in some program. Calctime can now be used to
automate that program's execution. Most people will not have use for
Cacltime's ability to add(or subtract) keys with one another, but
someone might, so I included it.
1-7 :
The switches 1-7 are used to change the logical "beginning of the
week" weekday. Does this sound strange? For most of us, the week
begins on Monday (or is it Friday afternoon), but the calender starts
on Sunday, and the motion picture industry begins the week on Friday.
This switch is used to select the beginning weekday for use in
calculating the week number of the year. This switch is designed for
use with business purposes in mind. If you are not going to be using
the "K" key, do not be concerned. If you will be using the "K" key,
please note that this utility assumes the week begins on Sunday. To
change this assumption, use the "1" - "7" switches:
The numbers correspond to days in this fashion:
/1 - Sunday (the default value)
/2 - Tuesday
/3 - Monday
/4 - Wednesday
/5 - Thursday
/6 - Friday
/7 - Saturday
P:
The "P" switch will Print the command line to the standard output
device before executing it.
- 3 -
R:
The "R" switch will cause Calctime to Read the current time (in
absolute seconds since 1970) from the standard input device. There
will be no prompt displayed by Calctime, thus, improper use can hold
up an automated batch file.
This switch can be extremely useful for batch files executing near
a time or date boundary (such as midnight). The R switch causes
Calctime to set the variable clock key (denoted by #) to absolute
seconds in time. This value is read from the standard input device and
is the number of seconds that have elapsed since Jan 1, 1970. This
value can be stored to a file using DOS redirection and the "Z" key.
The general idea is to save a time value to a temporary file, and
then use that file (via DOS redirection) as input to the /R switch. To
save the current time value, use the Z substitution key. The following
example shows this procedure:
CALCTIME echo $z > holdtime { store absolute seconds to temp file }
CALCTIME /r copy c:\daily\files\*.* c:\archive\#m-#d-#y.dat < holdtime
{ use the saved time in the next cmd }
DEL holdtime { delete the temp file after your done with it }
Although this example doesn't really show off /R's usefulness, try to
imagine a batch file that is much longer and occurs just before
midnight. Although it has not been wise to set up a system to do
day-end processing before the midnight barrier, this program does give
you the power and flexibility to do such systems.
E:
The "E" switch tells Calctime to